<?php
    include ("./src/jpgraph.php");
    include ("./src/jpgraph_bar.php");
    $datay=array(0,0,0,0,0,4,23,29,21,64,136,157,111,111,33,54,88,4,19,66,14,0,0,0,0,0,0,0,0,0,0,0);
    $graph = new Graph(800,450,"auto");    
    $graph->SetScale("textlin");

  $graph->SetShadow();
		$datax = array("V","Cm(l)","Cm(m)","Cm(u)","O(l)","O(m)","O(u)","S(l)","S(m)","S(u)","D(l)","D(m)","D(u)","CMs","CPn","P(l)","P(u)","Tr(l)","Tr(m)","Tr(u)","J(l)","J(m)","J(u)","K(l)","K(u)","Pg(Pal)","Pg(Eo)","Pg(Oli)","Ng(Mio)","Ng(Pli)","Ng(Plei)","Ng(Re)");
		
    $graph->xaxis->SetTickLabels($datax);
    $graph->xaxis->SetLabelAngle(90);

    $graph->img->SetMargin(40,30,20,120);
    $bplot = new BarPlot($datay);
    $bplot->SetFillColor('orange');
    $bplot->SetWidth(0.5);
      $bplot->value->Show();
      
		$bplot->value->SetFormat('%d');
		
    
    //$bplot->value->Show();
    $graph->Add($bplot);
    $graph->title->Set("Extinction");
		$graph->xaxis->title->Set("Epoch Interval");
		
	
	
	
   // $graph->xaxis->title->Set("Stage Interval");
    $graph->xaxis->title->SetMargin(80);
    $graph->yaxis->title->Set("Number of Genera");
    $graph->title->SetFont(FF_FONT1,FS_BOLD,8);
    $graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
    $graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);
    $graph->Stroke();
    ?>